package pet_pavilion.yushougeums.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class UserAddNewParam implements Serializable {
    @NotNull(message = "注册用户失败，必须提交注册名称！")
    @ApiModelProperty(value = "用户名称",required = true,example = "root")
    private String username;

    @NotNull(message = "注册用户失败，必须提交注册密码！")
    @ApiModelProperty(value = "用户密码",required = true,example = "root")
    private String password;

    @NotNull(message = "注册用户失败，必须提交注册名称！")
    @Range(min = 11 ,max = 11,message = "添加手机号码失败，手机号值必须11位！")
    private String telephone;

    /**
     * 是否启用，1=启用，0=未启用
     */
//    @NotNull(message = "注册用户失败，必须提交该用户是否启用！")
//    @Range(max = 1,message = "添加是否启用失败，启用失败必须为0或1！")
//    private Integer enable;
    //传过来都是字符串  String Integer TypeMismatch
    // typeMismatch.userAddNewParam.telephone
}
